package com.feri.rbacsys.controller;
import com.feri.rbacsys.service.intf.TorderService;
import com.feri.rbacsys.vo.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Author:陈琳琳
 */
@RestController
@RequestMapping("/api/torder/")
@Api(tags = "售后")
public class TorderController {
    @Resource
    TorderService service;
    @GetMapping("list")
    @ApiOperation("获取退单申请")
    public R getTorder(){
        return service.getTorderList();
    }
    @GetMapping("refuse")
    @ApiOperation("拒绝退单")
    public R refuseTorder(Integer tid){
        return service.refuseTorder(tid);
    }
    @GetMapping("allowed")
    @ApiOperation("允许退单")
    public R allowedTorder(Integer tid){
        return service.allowedTorder(tid);
    }
}
